import React from "react";
import { Card, Row, Col, Table, message, Modal, Button, Badge } from "antd";
import { ColumnProps, SortOrder } from "antd/es/table";
import { PaginationConfig } from "antd/es/pagination/Pagination";
import { TableRowSelection, SorterResult } from "antd/es/table/interface";
import AJAX, { AJAXResponseConfig, AJAXRequestConfig } from "../../ajax/ajaxServer";
import { formatSex, formatInterest } from "../../utils/tools";
import { getPaginationConfig } from "../../utils/utils";
import { ResponseResult, UserInfo } from "../../utils/interface";
import "./index.less";

interface IProps {}
interface IStates {}

class NormalComponent extends React.Component<IProps, IStates> {
	paramConfig1: any;

	constructor(props: IProps, state: IStates) {
		super(props, state);
		this.state = {};
	}

	componentDidMount() {
		// this.requestStandardDatas();
	}

	insert() {
		let config: AJAXRequestConfig = {
			url: "/api/products/list"
			// params: this.paramConfig1
		};
		AJAX.DBInsert(config).then(res => {
			console.log(res);
		});
	}

	render() {
		return (
			<div>
				<div style={{ textAlign: "center", color: "red" }}>
					<h1>Test DB</h1>
				</div>
				<Card title="测试" className="button-wrap">
					<Row>
						<Col span={24}>
							<Button type="primary" onClick={this.insert}>
								{`Insert`}
							</Button>
							<Button type="default">button</Button>
							<Button type="link">button</Button>
							<Button type="ghost">button</Button>
							<Button type="dashed">button</Button>
							<Button type="danger">button</Button>
							<Button disabled={true}>不可用按钮</Button>
						</Col>
					</Row>
				</Card>
			</div>
		);
	}
}

export default NormalComponent;
